import globalConfig from "@/utils/config.js";
import { request } from "@/utils/http.js";

const baseUrl = globalConfig.microUrl;

export default {
  getShopDataList: (data) => {
    return request({
      url: `${baseUrl}/st/store/list`,
      method: "GET",
      data
    });
  },
  getGoods: (data) => {
    return request({
      url: `${baseUrl}/gd/goods/search`,
      method: "GET",
      data
    });
  },
  // 获取店铺列表
  getShopList: (data) => {
    return request({
      url: `${baseUrl}/st/store/list`,
      method: "GET",
      data
    });
  },
  // 店铺首页
  shopHomeData: (data) => {
    return request({
      url: `${baseUrl}/store/storeCustomer/findStoreCustomerById`,
      method: "GET",
      data
    });
  },
  // 店铺详情
  shopDetail: (data) => {
    return request({
      url: `${baseUrl}/st/store/findCompanyInfoByStoreId`,
      method: "GET",
      data
    });
  },
  // 店铺企业认证信息
  qualDetail: (data) => {
    return request({
      url: `${baseUrl}/store/findCompanyInfoById`,
      method: "GET",
      data
    });
  },
  // 店铺支付信息
  findBankInfo: (data) => {
    return request({
      url: `${baseUrl}/st/store/findBankInfo`,
      method: "GET",
      data
    });
  },
  // // 分类详情
  storeCategory: (data) => {
    return request({
      url: `${baseUrl}/gd/category/listAll`,
      method: "GET",
      data
    });
  },
  // 申请入驻
  storeApplyAdd: (data) => {
    return request({
      url: `${baseUrl}/st/storeApply/add`,
      method: "POST",
      data
    });
  },
  // 入驻申请状态
  storeApplyGet: (data) => {
    return request({
      url: `${baseUrl}/st/storeApply/get`,
      method: "GET",
      data
    });
  },
  // 修改入驻
  storeApplyEdit: (data) => {
    return request({
      url: `${baseUrl}/st/storeApply/edit`,
      method: "POST",
      data
    });
  },
  // 获取大类
  getMaterialStoreGoodsList: (data) => {
    return request({
      url: `${baseUrl}/gd/goods/getMaterialStoreGoodsList`,
      method: "GET",
      data
    });
  },
  // 获取巴斯夫商品推荐
  getGoodsBrandRecommList: (data) => {
    return request({
      url: `${baseUrl}/gd/goods/getGoodsBrandRecommList`,
      method: "GET",
      data
    });
  },
  // 获取巴斯夫商品分类
  getGoodsBrandGroupCateList: (data) => {
    return request({
      url: `${baseUrl}/gd/goods/getGoodsBrandGroupCateList`,
      method: "GET",
      data
    });
  },
  // 获取商家经营类目
  getStoreCategoryListAll: (data) => {
    return request({
      url: `${baseUrl}/gd/goodsCate/listAll`,
      method: "GET",
      data
    });
  },
  // 商家入驻意向申请
  addStoreIntent: (data) => {
    return request({
      url: `${baseUrl}/storeIntent/create`,
      method: "POST",
      data
    });
  },
  // 入驻意向申请列表
  getStoreIntentList: (data) => {
    return request({
      url: `${baseUrl}/storeIntent/list`,
      method: "GET",
      data
    });
  },
  //  新增入驻申请
  addSettleIn: (data) => {
    return request({
      url: `${baseUrl}/settleIn/createSettleIn`,
      method: "POST",
      data
    });
  },
  // 编辑入驻申请
  editSettleIn: (data) => {
    return request({
      url: `${baseUrl}/settleIn/updateSettleIn`,
      method: "POST",
      data
    });
  },
  // 校验手机号
  checkStoreManagerPhone: (data) => {
    return request({
      url: `${baseUrl}/settleIn/checkStoreManagerPhone`,
      method: "GET",
      data
    });
  },
  // 发送验证码
  sendSms: (data) => {
    return request({
      url: `${baseUrl}/settleIn/sendSms`,
      method: "GET",
      data
    });
  },
  // 校验验证码
  checkCode: (data) => {
    return request({
      url: `${baseUrl}/settleIn/checkCode`,
      method: "GET",
      data
    });
  },
  // 获取店铺入驻信息
  getDetailFromWww: (data) => {
    return request({
      url: `${baseUrl}/settleIn/getDetailFromWww`,
      method: "GET",
      data
    });
  },
  // 获取店铺列表
  findPage: (data) => {
    return request({
      url: `${baseUrl}/store/getIndexRecommendStoreAndGoods`,
      method: "GET",
      data
    });
  },
  // 获取店铺状态
  findStoreBusinessStatus: (data) => {
    return request({
      url: `${baseUrl}/store/findStoreBusinessStatus`,
      method: "GET",
      data
    });
  },
  // 获取店铺联系人列表
  findStoreCustomerListById: (data) => {
    return request({
      url: `${baseUrl}/store/storeCustomer/findStoreCustomerListById`,
      method: "GET",
      data
    });
  }
};
